'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/system-defines', controller.systemDefine.get);
  router.post('/system-defines', controller.systemDefine.add);

  router.post('/user/logout', controller.user.logout);
  router.post('/user/login', controller.user.login);
  router.get('/user/info', controller.user.info);

  router.resources('/define-tables', controller.defineTable);
};
